<p:dialog xmlns="http://www.w3.org/1999/xhtml"
      	  xmlns:h="http://java.sun.com/jsf/html"
      	  xmlns:f="http://java.sun.com/jsf/core"
      	  xmlns:ui="http://java.sun.com/jsf/facelets"
      	  xmlns:p="http://primefaces.org/ui"
      	  modal="true"  resizable="true" width="40%"
		  widgetVar="dialogConsultarPais" id="idDialogConsultarPais" closable="true"
		  appendTo="@(body)" header="Consultar Pais"> 	
  	
<h:form id="formDialogConsultarPais" prependId="false">
<h:panelGroup id="pgDialogConsultarPais">
 	<p:messages id="messagesDialogConsultarPais" autoUpdate="true" closable="true" /> 
    	<h:panelGrid columns="4" style="text-align:center; margin-top:20px; margin-right:10%;">  
            <h:outputLabel value="Código" style="font-size:14px; float:left; padding-right:20px "/>  
            <h:outputLabel value="Pais" style="font-size:14px; float:left"/> 
            <h:outputLabel />
            <h:outputLabel />
            <p:inputText value="#{contaPagarBean.pais.idPais}" styleClass="inputId">
            	<p:ajax listener="#{contaPagarBean.ajaxGet}"/>
            </p:inputText>  
  			<p:inputText value="#{contaPagarBean.pais.descricao}" styleClass="inputDescricao">
  				<p:ajax listener="#{contaPagarBean.ajaxGet}"/>
            </p:inputText>   
  			<p:commandButton value="Consultar" actionListener="#{contaPagarBean.findPais}" process="@this" update="dataTablePais" />
  			<p:commandButton value="Novo" actionListener="#{contaPagarBean.openDialogManterPais}" process="@this"/> 
        </h:panelGrid>      		
    <p:dataTable id="dataTablePais" var="Pais" value="#{contaPagarBean.dmPais}"  
    			 rowKey="#{Pais.idPais}"  selectionMode="single"
                 paginator="true" rows="10" style="padding-top:20px;">     
		<p:column sortBy="#{Pais.idPais}" style="width:5%; text-align:center">  
            <f:facet name="header">  
                <h:outputText value="Código" />  
            </f:facet>  
            <h:outputText value="#{Pais.idPais}" />  
        </p:column>  
  
        <p:column sortBy="#{Pais.descricao}">  
            <f:facet name="header">  
                <h:outputText value="Pais" />  
            </f:facet>  
            <h:outputText value="#{Pais.descricao}" />  
        </p:column>  
       
        <p:column style="width:5%; text-align:center">   
            <f:facet name="header">  
                <h:outputText value="DDI" />  
            </f:facet>  
            <h:outputText value="#{Pais.ddi}" />  
        </p:column>  
        
        <p:column style="width:4%; text-align:center">  
        	<f:facet name="header">
        	 <h:outputText value="Selecionar" />
        	</f:facet>
         	<p:commandButton id="selectButtonEditar" actionListener="#{contaPagarBean.selectPais}" process="@this"  icon="ui-icon-circle-plus" title="Add" />
        </p:column>
    </p:dataTable>  
 </h:panelGroup>
 </h:form>
 <ui:include src="/view/contaPagar/dialogManterPais.xhtml"></ui:include>
</p:dialog>
